import java.util.*;

public class test {
    public static void main(String[] args) {

    }
    //牛客 旧键盘
    public static void main0(String[] args) {
        Scanner in = new Scanner(System.in);
        HashSet<Character> set = new HashSet<>();
        HashSet<Character> set1 = new HashSet<>();
        String s = in.next();s = s.toUpperCase();
        String s1 = in.next();s1 = s1.toUpperCase();
        for(int i = 0;i < s1.length();i++){
            char c = s1.charAt(i);
            set.add(c);
        }
        for(int i = 0;i < s.length();i++){
            char c = s.charAt(i);
            if(!set.contains(c) && !set1.contains(c)){
                System.out.print(c);
                set1.add(c);
            }
        }
    }
    //牛客 旧键盘打字
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        HashSet<Character> set = new HashSet<>();
        boolean num = false;
        String s1 = in.next();
        String s2 = in.next();
        for(int i = 0;i < s1.length();i++){
            char m = s1.charAt(i);
            if(m == '+'){
                num = true;
            }
            char c = Character.toUpperCase(m);
            char C = Character.toLowerCase(m);
            set.add(c);
            set.add(C);
        }
        for(int i = 0;i < s2.length();i++){
            char c = s2.charAt(i);
            if(!set.contains(c)){
                if(Character.isUpperCase(c) && num){
                    continue;
                }
                System.out.print(c);
            }
        }
    }
    //leetcode 只出现一次的数字(三种解法)
    //法1.位运算符
    public int singleNumber(int[] nums){
        int num = 0;
        for(int i = 0;i < nums.length;i++){
            num ^= nums[i];
        }
        return num;
    }

    //法2.HashSet
    public int singleNumber2(int[] nums){
        HashSet<Integer> set = new HashSet<>();
        for(int i = 0;i < nums.length;i++){
            if(!set.contains(nums[i])){
                set.add(nums[i]);
            }else {
                set.remove(nums[i]);
            }
        }
        return set.iterator().next();
    }

    //法3.HashMap
    public int singleNumber3(int[] nums){
        HashMap<Integer,Integer> set = new HashMap<>();
        for(int i = 0;i < nums.length;i++){
            if(set.containsKey(nums[i])){
                set.put(nums[i],2);
            }else {
                set.put(nums[i],1);
            }
        }
        for(Integer num : set.keySet()){
            if(set.get(num) == 1){
                return num;
            }
        }
        return -1;
    }
}
